3.2 \(\int x^2 \sinh (a+b x^2) \, dx\)

Optimal. Leaf size=69 \[ -\frac{\sqrt{\pi } e^{-a} \text{Erf}\left (\sqrt{b} x\right )}{8 b^{3/2}}-\frac{\sqrt{\pi } e^a \text{Erfi}\left (\sqrt{b} x\right )}{8 b^{3/2}}+\frac{x \cosh \left (a+b x^2\right )}{2 b} \]

[Out]

(x*Cosh[a + b*x^2])/(2*b) - (Sqrt[Pi]*Erf[Sqrt[b]*x])/(8*b^(3/2)*E^a) - (E^a*Sqrt[Pi]*Erfi[Sqrt[b]*x])/(8*b^(3
/2))

________________________________________________________________________________________

Rubi [A]  time = 0.0414219, antiderivative size = 69, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.333, Rules used = {5324, 5299, 2204, 2205} \[ -\frac{\sqrt{\pi } e^{-a} \text{Erf}\left (\sqrt{b} x\right )}{8 b^{3/2}}-\frac{\sqrt{\pi } e^a \text{Erfi}\left (\sqrt{b} x\right )}{8 b^{3/2}}+\frac{x \cosh \left (a+b x^2\right )}{2 b} \]

Antiderivative was successfully verified.

[In]

Int[x^2*Sinh[a + b*x^2],x]

[Out]

(x*Cosh[a + b*x^2])/(2*b) - (Sqrt[Pi]*Erf[Sqrt[b]*x])/(8*b^(3/2)*E^a) - (E^a*Sqrt[Pi]*Erfi[Sqrt[b]*x])/(8*b^(3
/2))

Rule 5324

Int[((e_.)*(x_))^(m_.)*Sinh[(c_.) + (d_.)*(x_)^(n_)], x_Symbol] :> Simp[(e^(n - 1)*(e*x)^(m - n + 1)*Cosh[c +
d*x^n])/(d*n), x] - Dist[(e^n*(m - n + 1))/(d*n), Int[(e*x)^(m - n)*Cosh[c + d*x^n], x], x] /; FreeQ[{c, d, e}
, x] && IGtQ[n, 0] && LtQ[0, n, m + 1]

Rule 5299

Int[Cosh[(c_.) + (d_.)*(x_)^(n_)], x_Symbol] :> Dist[1/2, Int[E^(c + d*x^n), x], x] + Dist[1/2, Int[E^(-c - d*
x^n), x], x] /; FreeQ[{c, d}, x] && IGtQ[n, 1]

Rule 2204

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[(F^a*Sqrt[Pi]*Erfi[(c + d*x)*Rt[b*Log[F], 2
]])/(2*d*Rt[b*Log[F], 2]), x] /; FreeQ[{F, a, b, c, d}, x] && PosQ[b]

Rule 2205

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[(F^a*Sqrt[Pi]*Erf[(c + d*x)*Rt[-(b*Log[F]),
 2]])/(2*d*Rt[-(b*Log[F]), 2]), x] /; FreeQ[{F, a, b, c, d}, x] && NegQ[b]

Rubi steps

\begin{align*} \int x^2 \sinh \left (a+b x^2\right ) \, dx &=\frac{x \cosh \left (a+b x^2\right )}{2 b}-\frac{\int \cosh \left (a+b x^2\right ) \, dx}{2 b}\\ &=\frac{x \cosh \left (a+b x^2\right )}{2 b}-\frac{\int e^{-a-b x^2} \, dx}{4 b}-\frac{\int e^{a+b x^2} \, dx}{4 b}\\ &=\frac{x \cosh \left (a+b x^2\right )}{2 b}-\frac{e^{-a} \sqrt{\pi } \text{erf}\left (\sqrt{b} x\right )}{8 b^{3/2}}-\frac{e^a \sqrt{\pi } \text{erfi}\left (\sqrt{b} x\right )}{8 b^{3/2}}\\ \end{align*}

Mathematica [A]  time = 0.0682744, size = 67, normalized size = 0.97 \[ \frac{\sqrt{\pi } (\sinh (a)-\cosh (a)) \text{Erf}\left (\sqrt{b} x\right )-\sqrt{\pi } (\sinh (a)+\cosh (a)) \text{Erfi}\left (\sqrt{b} x\right )+4 \sqrt{b} x \cosh \left (a+b x^2\right )}{8 b^{3/2}} \]

Antiderivative was successfully verified.

[In]

Integrate[x^2*Sinh[a + b*x^2],x]

[Out]

(4*Sqrt[b]*x*Cosh[a + b*x^2] + Sqrt[Pi]*Erf[Sqrt[b]*x]*(-Cosh[a] + Sinh[a]) - Sqrt[Pi]*Erfi[Sqrt[b]*x]*(Cosh[a
] + Sinh[a]))/(8*b^(3/2))

________________________________________________________________________________________

Maple [A]  time = 0.048, size = 74, normalized size = 1.1 \begin{align*}{\frac{{{\rm e}^{-a}}x{{\rm e}^{-b{x}^{2}}}}{4\,b}}-{\frac{{{\rm e}^{-a}}\sqrt{\pi }}{8}{\it Erf} \left ( x\sqrt{b} \right ){b}^{-{\frac{3}{2}}}}+{\frac{{{\rm e}^{a}}{{\rm e}^{b{x}^{2}}}x}{4\,b}}-{\frac{{{\rm e}^{a}}\sqrt{\pi }}{8\,b}{\it Erf} \left ( \sqrt{-b}x \right ){\frac{1}{\sqrt{-b}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*sinh(b*x^2+a),x)

[Out]

1/4*exp(-a)/b*x*exp(-b*x^2)-1/8*exp(-a)/b^(3/2)*Pi^(1/2)*erf(x*b^(1/2))+1/4*exp(a)*exp(b*x^2)*x/b-1/8*exp(a)/b
*Pi^(1/2)/(-b)^(1/2)*erf((-b)^(1/2)*x)

________________________________________________________________________________________

Maxima [B]  time = 0.992813, size = 149, normalized size = 2.16 \begin{align*} \frac{1}{3} \, x^{3} \sinh \left (b x^{2} + a\right ) - \frac{1}{24} \, b{\left (\frac{2 \,{\left (2 \, b x^{3} e^{a} - 3 \, x e^{a}\right )} e^{\left (b x^{2}\right )}}{b^{2}} - \frac{2 \,{\left (2 \, b x^{3} + 3 \, x\right )} e^{\left (-b x^{2} - a\right )}}{b^{2}} + \frac{3 \, \sqrt{\pi } \operatorname{erf}\left (\sqrt{b} x\right ) e^{\left (-a\right )}}{b^{\frac{5}{2}}} + \frac{3 \, \sqrt{\pi } \operatorname{erf}\left (\sqrt{-b} x\right ) e^{a}}{\sqrt{-b} b^{2}}\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*sinh(b*x^2+a),x, algorithm="maxima")

[Out]

1/3*x^3*sinh(b*x^2 + a) - 1/24*b*(2*(2*b*x^3*e^a - 3*x*e^a)*e^(b*x^2)/b^2 - 2*(2*b*x^3 + 3*x)*e^(-b*x^2 - a)/b
^2 + 3*sqrt(pi)*erf(sqrt(b)*x)*e^(-a)/b^(5/2) + 3*sqrt(pi)*erf(sqrt(-b)*x)*e^a/(sqrt(-b)*b^2))

________________________________________________________________________________________

Fricas [B]  time = 2.11412, size = 539, normalized size = 7.81 \begin{align*} \frac{2 \, b x \cosh \left (b x^{2} + a\right )^{2} + 4 \, b x \cosh \left (b x^{2} + a\right ) \sinh \left (b x^{2} + a\right ) + 2 \, b x \sinh \left (b x^{2} + a\right )^{2} + \sqrt{\pi }{\left (\cosh \left (b x^{2} + a\right ) \cosh \left (a\right ) +{\left (\cosh \left (a\right ) + \sinh \left (a\right )\right )} \sinh \left (b x^{2} + a\right ) + \cosh \left (b x^{2} + a\right ) \sinh \left (a\right )\right )} \sqrt{-b} \operatorname{erf}\left (\sqrt{-b} x\right ) - \sqrt{\pi }{\left (\cosh \left (b x^{2} + a\right ) \cosh \left (a\right ) +{\left (\cosh \left (a\right ) - \sinh \left (a\right )\right )} \sinh \left (b x^{2} + a\right ) - \cosh \left (b x^{2} + a\right ) \sinh \left (a\right )\right )} \sqrt{b} \operatorname{erf}\left (\sqrt{b} x\right ) + 2 \, b x}{8 \,{\left (b^{2} \cosh \left (b x^{2} + a\right ) + b^{2} \sinh \left (b x^{2} + a\right )\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*sinh(b*x^2+a),x, algorithm="fricas")

[Out]

1/8*(2*b*x*cosh(b*x^2 + a)^2 + 4*b*x*cosh(b*x^2 + a)*sinh(b*x^2 + a) + 2*b*x*sinh(b*x^2 + a)^2 + sqrt(pi)*(cos
h(b*x^2 + a)*cosh(a) + (cosh(a) + sinh(a))*sinh(b*x^2 + a) + cosh(b*x^2 + a)*sinh(a))*sqrt(-b)*erf(sqrt(-b)*x)
 - sqrt(pi)*(cosh(b*x^2 + a)*cosh(a) + (cosh(a) - sinh(a))*sinh(b*x^2 + a) - cosh(b*x^2 + a)*sinh(a))*sqrt(b)*
erf(sqrt(b)*x) + 2*b*x)/(b^2*cosh(b*x^2 + a) + b^2*sinh(b*x^2 + a))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int x^{2} \sinh{\left (a + b x^{2} \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*sinh(b*x**2+a),x)

[Out]

Integral(x**2*sinh(a + b*x**2), x)

________________________________________________________________________________________

Giac [A]  time = 1.30708, size = 101, normalized size = 1.46 \begin{align*} \frac{x e^{\left (b x^{2} + a\right )}}{4 \, b} + \frac{x e^{\left (-b x^{2} - a\right )}}{4 \, b} + \frac{\sqrt{\pi } \operatorname{erf}\left (-\sqrt{b} x\right ) e^{\left (-a\right )}}{8 \, b^{\frac{3}{2}}} + \frac{\sqrt{\pi } \operatorname{erf}\left (-\sqrt{-b} x\right ) e^{a}}{8 \, \sqrt{-b} b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*sinh(b*x^2+a),x, algorithm="giac")

[Out]

1/4*x*e^(b*x^2 + a)/b + 1/4*x*e^(-b*x^2 - a)/b + 1/8*sqrt(pi)*erf(-sqrt(b)*x)*e^(-a)/b^(3/2) + 1/8*sqrt(pi)*er
f(-sqrt(-b)*x)*e^a/(sqrt(-b)*b)